import {http} from "@/interceptor/luch-request/index.js"


// 职工登录
export const staffLogin = (data) => {
    return http.post("api/app/oauth/v1/staff/login", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 家长登录
export const parentsLogin = (data) => {
    return http.post("api/app/oauth/v1/parents/login", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 保存字典项
export const dictSave = (data) => {
    return http.post("api/admin/dict/v1/save", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

// 编辑字典项
export const dictUpdate = (data) => {
    return http.put("api/admin/dict/v1/update", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}
// 所有字典项
export const dictList = (data) => {
	return http.get("api/admin/dict/v1/list", {
		data: data
	});
}

//传id获取指定的字典项
export const dictListInfo = (id) => {
    return http.get("api/admin/dict/v1/list/"+id,{
		header:{
			"Content-Type": "application/json"
		}
	});	
}

export const resetPwd = (id) => {
    return http.post("api/admin/user/v1/resetPwd/"+id,{
		header:{
			"Content-Type": "application/json"
		}
	});	
}


//查询用户可管理的学校
export const basicUserdeptList = (data) => {
	return http.get("api/app/basicUserDept/v1/list", {
		data: data
	});
}

export const basicUserdeptPost = (id) => {
    return http.post("api/admin/basicUserDept/v1/post/"+id,{
		header:{
			"Content-Type": "application/json"
		}
	});	
}

// 新增用户可管理的学校
export const basicUserdeptSave = (data) => {
    return http.post("api/admin/basicUserDept/v1/save", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

//超级管理员看到的学校绑定人员的列表
export const basicUserdeptPage = (data) => {
	return http.get("api/admin/basicUserDept/v1/page", {
		data: data
	});
}